home *** CD-ROM | disk | FTP | other *** search
/ The Book of Tells / The Book of Tells.iso / vidgal.dir / 00291_Script_291 < prev    next >
Text File  |  1994-09-22  |  7KB  |  247 lines

  1. on startMovie
  2.   
  3.     set the puppet of sprite 20 to TRUE
  4.   set the puppet of sprite 23 to TRUE
  5.   set the puppet of sprite 25 to TRUE
  6.   set the puppet of sprite 26 to TRUE
  7.   set the puppet of sprite 27 to TRUE
  8.   set the puppet of sprite 28 to TRUE
  9.   set the puppet of sprite 29 to TRUE
  10.   set the puppet of sprite 30 to TRUE
  11.   set the puppet of sprite 34 to TRUE
  12.   set the visible of sprite 28 to FALSE
  13.   set the visible of sprite 29 to FALSE
  14.   set the visible of sprite 30 to FALSE
  15.   set the visible of sprite 34 to FALSE
  16.   set the locH of sprite 28 to -200
  17.   set the locH of sprite 29 to -200
  18.   set the locH of sprite 30 to -200
  19.   set the scriptText of cast 29 = the scriptText of cast 23
  20.   set the scriptText of cast 31 = the scriptText of cast 24
  21.   set the scriptText of cast 32 = the scriptText of cast 25
  22.   set the itemDelimiter = "~"
  23.   
  24.   global lineNum, class, oldInfoBox,audioClip,movieClip,movieSpriteNum
  25.   put word 1 of field "Title" into infoBox
  26.   put word 2 of field "Title" after infoBox
  27.   put line (numberLines - 8) of field infoBox into audioClip
  28.   put line (numberLines - 10) of field infoBox into movieClip
  29.   
  30.   -- This is the sprite where the movie is
  31.   set movieSpriteNum=6
  32.   puppetSprite movieSpriteNum,TRUE
  33.   
  34.   
  35. end startMovie
  36.  
  37.  
  38.  
  39. -- ************************************************
  40. -- Name: divide
  41. -- Description:
  42. -- ************************************************
  43. on divide a,b
  44.   if b<>0 then
  45.     return integer( ((a+0.0) / (b+0.0)) - 0.49 )
  46.   else
  47.     return 0
  48.   end if
  49. end divide 
  50.  
  51.  
  52.  
  53. -- ************************************************
  54. -- Name: setTime
  55. -- Description:
  56. -- ************************************************
  57. on setTime
  58.   global movieSpriteNum,mStartTime,mStopTime
  59.   set tmpc=string(divide( ((the movieTime of sprite movieSpriteNum)-mStartTime),12 )+1 )
  60.   set tmpm=string(divide( (mStopTime-mStartTime),12)+1)
  61.   --  put (the movieTime of sprite movieSpriteNum)-mStartTime&"/"&(mStopTime-mStartTime)&" --"&tmps into field "time" 
  62.   put tmpc&"/"&tmpm into field "time" 
  63.   
  64. end setTime
  65.  
  66.  
  67.  
  68. -- ******************************************************
  69. -- Name: buttonAction
  70. -- Description: 
  71. --                      
  72. -- Example: buttonAction(TRUE)
  73. -- ******************************************************
  74. on buttonAction silent
  75.   
  76.   global activated
  77.   set activated = TRUE
  78.   
  79.   if not(silent=TRUE) then sound playfile 1, "MouseDown"
  80.   
  81.   set ButtonUpName = the name of cast (the castnum of sprite the ClickOn)
  82.   
  83.   
  84.   set tmp1=ButtonUpName&"1"
  85.   set tmp2=ButtonUpName&"2"
  86.   set tmp3=ButtonUpName&"3"
  87.   set ButtonDownName = ButtonUpName&"3"
  88.   
  89.   set the castnum of sprite the ClickOn = the number of cast tmp1
  90.   updatestage
  91.   startTimer
  92.   repeat while the timer < 5
  93.   end repeat
  94.   
  95.   set the castnum of sprite the ClickOn = the number of cast tmp2
  96.   updatestage
  97.   startTimer
  98.   repeat while the timer < 5
  99.   end repeat
  100.   
  101.   set the castnum of sprite the ClickOn = the number of cast tmp3
  102.   updatestage
  103.   startTimer
  104.   repeat while the timer < 5
  105.   end repeat
  106.   
  107.   set buttonOn=TRUE
  108.   repeat while the stillDown = TRUE
  109.     
  110.     if rollover (the clickOn) = TRUE then
  111.       if buttonOn=FALSE then
  112.         set buttonON=TRUE
  113.         set the castnum of sprite the ClickOn = the number of cast tmp1
  114.         updatestage
  115.         startTimer
  116.         repeat while the timer < 5
  117.         end repeat
  118.         
  119.         set the castnum of sprite the ClickOn = the number of cast tmp2
  120.         updatestage
  121.         startTimer
  122.         repeat while the timer < 5
  123.         end repeat
  124.         
  125.         set the castnum of sprite the ClickOn = the number of cast tmp3
  126.         updatestage
  127.         startTimer
  128.         repeat while the timer < 5
  129.         end repeat
  130.       else
  131.         
  132.         set activated = TRUE
  133.         set the castnum of sprite the ClickOn = the number of cast ButtonDownName
  134.         updatestage
  135.       end if
  136.       
  137.     else  
  138.       set buttonOn=FALSE
  139.       set activated = FALSE
  140.       set the castnum of sprite the ClickOn = the number of cast ButtonUpName
  141.       updatestage
  142.       
  143.     end if
  144.     
  145.   end repeat
  146.   
  147.   if activated = FALSE then exit
  148.   
  149.   set the castnum of sprite the ClickOn = the number of cast ButtonUpName
  150.   updatestage
  151.   
  152. end buttonAction
  153.  
  154.  
  155. -- ******************************************************
  156. -- Name: menuSelect
  157. -- Description: Checks the position of the mouse in a text field
  158. -- and highlights the current line.  Pass it the number of the
  159. -- text field.  The variable lineNum is used internally to
  160. -- stop looping to prevent the highlight from flashing and can
  161. -- also be used externally to pass where the mouse was when the
  162. -- user released the mouse button.
  163. --                      
  164. -- Example: menuSelect {castNumber)
  165. -- ******************************************************
  166.  
  167.  
  168. on menuSelect castNumber
  169.   
  170.   global lineNum
  171.   global bottoma
  172.   global topa
  173.   set lineNum = 0
  174.   set hiliteSet = 0
  175.   set mousePos = 0
  176.   
  177.   repeat while the stillDown
  178.     
  179.     if the mouseCast = the  number of cast (castNumber) then
  180.       
  181.       
  182.       if lineNum = (the mouseLine) and the mouseV = mousePos then
  183.         
  184.         nothing
  185.         
  186.       else if the mouseLine = -1 then
  187.         set the hilite of field (castNumber) to 0
  188.         set lineNum = 0
  189.         
  190.         
  191.         --     else if the mouseH > 680 then
  192.         --       set the hilite of field (castNumber) to 0
  193.         --       set lineNum = 0
  194.         --       
  195.         --     else if the mouseH < 5 then
  196.         --       set the hilite of field (castNumber) to 0
  197.         --       set lineNum = (the mouseLine)
  198.         --       
  199.         --    else if the mouseV < 13 then
  200.         --      set the hilite of field (castNumber) to 0
  201.         --      set lineNum = 0
  202.         --        
  203.         --    else if the mouseV > 400 then
  204.         --      set the hilite of field (castNumber) to 0
  205.         --      set lineNum = 0
  206.         --      
  207.         
  208.       else 
  209.         hilite line (the mouseLine) of field (castNumber)
  210.         set lineNum = (the mouseLine)
  211.         set mousePos = the mouseV
  212.         
  213.       end if
  214.       
  215.     else
  216.       set the hilite of field (castNumber) to 0
  217.       set lineNum = 0
  218.       
  219.     end if
  220.     
  221.   end repeat
  222.   
  223. end menuSelect
  224.  
  225. -- ******************************************************
  226. -- Name: putHelp
  227. -- Description: 
  228. --                      
  229. -- Example: 
  230. -- ******************************************************
  231. on putHelp castMemName,spriteNum
  232.   set hInstance = the mouseh
  233.   set vInstance = the mousev
  234.   set the castNum of sprite spriteNum to the number of cast castMemName
  235.   set the loch of sprite spriteNum to hInstance
  236.   set the locv of sprite spriteNum to vInstance
  237.   updateStage 
  238.   
  239.   repeat while the stilldown
  240.     
  241.   end repeat
  242.   
  243.   set the loch of sprite spriteNum to -300
  244.   set the loch of sprite spriteNum to -300
  245.   updateStage
  246.   
  247. end putHelp